<?php
$this->display('public/header.phtml', array(
    "title"    => "管理员列表",
    "styles"   => '',
    "crumbArr" => array(
        array("title" => "管理员列表"),
    ),
));
?>

<div class="row">
    <div class="col-xs-12">
        <div class="row">
            <div class="col-xs-12">
                <form class="form-inline form-search">
                    <div class="form-group">
                        <label for="nameInput">管理员名称</label>
                        <input type="text" name="admin_name"/>
                    </div>
                    <button type="submit" class="btn-sm btn btn-primary">搜 索</button>
                    <a class="btn btn-sm btn-primary" href="/admin/admin/add/">增加管理员</a>
                </form>
                <div class="space-4"></div>

                <!-- <div class="dataTables_borderWrap"> -->
                <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                    <thead>
                        <tr>
                            <th>编号</th>
                            <th>管理员名称</th>
                            <th>邮箱</th>
                            <th>状态</th>
                            <th>最后登录时间</th>
                            <th>最后登录IP</th>
                            <th>操作</th>
                        </tr>
                    </thead>

                    <tbody>
                        <?php foreach ($listData as $row): ?>
                            <tr>
                                <td><?php echo $row['admin_id']; ?></td>
                                <td><?php echo $row['admin_name']; ?></td>
                                <td><?php echo $row['admin_email']; ?></td>
                                <td><?php echo $row['status_name']; ?></td>
                                <td>
                                    <?php if ($row['last_login_time']): ?>
                                        <?php echo date('Y-m-d H:i:s', $row['last_login_time']); ?>
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <?php echo $row['last_login_ip'] ?>
                                </td>
                                <td>
                                    <div class="hidden-sm hidden-xs action-buttons">
                                        <a href="/admin/admin/edit/?admin_id=<?php echo $row['admin_id'] ?>">
                                            编辑
                                        </a>
                                    </div>
                                </td>
                            </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
                <?php $this->display('public/pagination.phtml', array('paginator' => $this->paginator->style1())); ?>
            </div>
        </div>
    </div><!-- /.col -->
</div><!-- /.row -->

<script type="text/javascript">

</script>

<?php
$this->display("public/footer.phtml", array(
    "scripts" => ''
));
?>
<?php $this->display("public/list_footer.phtml"); ?>
<?php $this->display("public/footer_body.phtml"); ?>